function subScribeMsg(tmplIds) {
	return new Promise((resolve, reject) => {
		uni.getSetting({
			withSubscriptions: true,
			success(res) {
				console.log('1', res, '订阅信息', res.subscriptionsSetting);
				if (!res.subscriptionsSetting.mainSwitch) {
					uni.openSetting({
						success(res) {
							console.log('打开设置页', res.authSetting);
						}
					})
				} else {
					uni.requestSubscribeMessage({
						tmplIds: tmplIds,
						success(res) {
							console.log('requestSubscribeMessage 订阅信息', res);
							resolve(res)
							if (res['UyBPbADlZfsCj89rh_xvfR2ZP1iwtmPcMFA0sUOJwog'] ==
								"accept") { // 用户点击确定后
								console.log('用户订阅点击确定按钮');
								// that.getSubMsg()
							} else {
								console.log('拒绝');
							}
						},
						fail(errMessage) {
							reject(errMessage)
							console.log("订阅消息 失败 ", errMessage);
						},
						complete() {
							// if (that.ordercode == null) return that.getOrder(appoint);
							// if (that.ordercode != null) return that.getPayOrder(appoint);
							// that.startDisabled = false
						}
					})
				}
			},
		})
	})
}


export default subScribeMsg